const timeline = this.pageObj.getApiWidgetByAliasName('timeline-v2');
const timelineDetail = this.pageObj.getApiWidgetByAliasName('timeline-detail');

let option = timeline.widgetObj._option;
let subOpt = timelineDetail.widgetObj._option;
const com = { nowrap: true, type: "text" }
const row = { column: 9, container: "content", nowrap: true, overflow: 'ellipsis', type: "object" }
const { data, index } = $event
console.log($event, timeline, option)

option.mode = 'card';
option.bubble = { type: 'bubble-border' };
option.triangle = { direction: 'bottom', bottom: -25 };

option.config[option.config.length - 1] = { ...row, field: "value", label: "任务状态" }
option.dataSource = [ data ];

timeline.widgetObj._option = option
timeline.widgetObj.render()

// 子列表
subOpt.duration = 'vertical';
subOpt.mode = 'timeline';
subOpt.bubble = { type: 'bubble' };
subOpt.triangle = { direction: 'left', left: -20 };
subOpt.config = [
  // 气泡内部的 第一行
  { ...com, column: 12, container: "content",  field: "value" },
  // 气泡内部的 第二行
  { ...com, column: 6, container: "content",  field: "name", overflow: 'ellipsis' },
  // 气泡内部的 第二行
  { ...com, column: 6, container: "content",  field: "value", overflow: 'ellipsis' },
];


timelineDetail.widgetObj._option = subOpt
timelineDetail.widgetObj.show({ top: 400, height: 400 });
timelineDetail.widgetObj.render()




